import validator from '../validator';
// 个人注册
export class CreateRegisterInput_Rules {
  constructor() {
    this.name = [validator.required('请输入姓名')];
    this.nationality = [validator.required('请输入国籍')];
    this.national = [validator.required('请选择民族', 'onChange')];
    this.idCardTypeCode = [validator.required('请选择证件类型', 'onChange')];
    this.idCardNumber = [validator.required('请输入证件号码')];
    this.genderCode = [validator.required('请选择性别', 'onChange')];
    this.birthDate = [validator.required('请选择出生日期', 'onChange')];
    this.phoneNumber = [
      {
        ...validator.required('请输入联系人手机号'),
        validator: validator.checkPhone,
        trigger: 'onBlur'
      }
    ];
    this.emergencyContactPhoneNumber = [
      {
        validator: validator.checkPhone,
        trigger: 'onBlur'
      }
    ];
    this.provinceCode = [validator.required('请选择所在地区', 'onChange')];
    this.address = [validator.required('请输入详细地址', 'onChange')];
  }
}

// 团体注册
export class CreateDelegationInput_Rules {
  constructor() {
    this.name = [validator.required('请输入团体名称')];
    this.shortName = [validator.required('请输入团体简称')];
    this.delegationTypeCode = [validator.required('请选择团队类型', 'onChange')];
    this.provinceCode = [validator.required('请选择所在地区', 'onChange')];
    this.address = [validator.required('请输入详细地址')];
    this.contactPerson = [validator.required('请输入联系人姓名')];
    this.phoneNumber = [
      {
        ...validator.required('请输入联系人手机号'),
        validator: validator.checkPhone,
        trigger: 'onBlur'
      }
    ];
  }
}

// 会员信息
export class ModMemberInfoVO_Rules {
  constructor() {
    this.parentTAProvinceCode = [validator.required('请输入团体名称', 'onChange')];
    this.ctaMemberId = [validator.required('请输入中国台协会员号', 'onBlur')];
    this.ctaMemberExipry = [validator.required('请选择中国跆协个人会员到期日', 'onChange')];
    this.ctaMemberImageUrl1 = [validator.required('请上传中国跆拳道会员信息照片', 'onChange')];
  }
}

// 中跆协级段信息
export class ModTkwChiDanVO_Rules {
  constructor() {
    // this.ctaBeltLevelId = [validator.required('请输入级位编号', 'onBlur')];
    // this.ctaBeltDuanId = [validator.required('请输入段位编号', 'onBlur')];
    this.ctaBeltLevelImageUrl1 = [validator.required('请上传中国跆协级位照片', 'onChange')];
    this.ctaBeltDuanImageUrl1 = [validator.required('请上传中国跆协段位照片', 'onChange')];
  }
}

// 国际跆拳道段位信息
export class ModTkwIntDanVO_Rules {
  constructor() {
    // this.wtaBeltLevel = [validator.required('请输入国际段位', 'onBlur')];
    this.wtaBeltId = [validator.required('请输入国际段位编号', 'onBlur')];
    this.wtaBeltName = [validator.required('请输入国际段位证书姓名（英文）', 'onBlur')];
    this.wtaBeltImageUrl1 = [validator.required('请上传中国跆协段位照片', 'onChange')];
  }
}

